package com.gang.mars.basic.constructor;

/**
 * @author gang.chen
 * @description
 * @Date 2021/6/14 13:40
 */
public class C1 extends C2 {

    public C1(){
        System.out.println("C1 say hello world...");
    }

    public static void main(String[] args) {
        //子方法执行构造函数，父方法构造函数会被执行
        C1 c1 = new C1();
        System.out.println(c1);
    }


}

class C2 extends C3{
    public C2(){
        System.out.println("C2 say hello world...");
    }
}

class C3 {
    public C3(){
        System.out.println("C3 say hello world");
    }
}

class C4 {

}